***use "C:/Users/jlj94166/Dropbox/Rivalry Type and Refugee Flows/PRQ Submission/Data Sets and Do Files/Rivalry_type_and_refugees_replication.dta"***


**ZINBs 

eststo zinb1Repression: zinb numrefugee ideol positional spatial contiguity multiple Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad)

eststo zinbRivalsRepression: zinb numrefugee rivals contiguity multiple Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad)


**contiguity interacted with ideol

eststo zinbdisagcontint: zinb numrefugee ideol##contiguity positional spatial multiple Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad)

eststo zinbrivalscontint: zinb numrefugee rivals##contiguity multiple Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad)


**ZINB Table:

esttab zinbRivalsRepression zinb1Repression using tableZINBs.rtf, replace label se varwidth(40) ///
	nonumbers mlabels("Rivals" "Rivalry Type" , nodep) collabels(,none) ///
	wrap varlabels(rivals Rivalry ideol Ideological_Rivalry positional Positional_Rivalry spatial Spatial_Rivalry contiguity Contiguity multiple Multiple Spolyarchy Sender_Democracy Rpolyarchy Receiver_Democracy rcivconf Receiver_Civil_Conflict rintconf Receiver_International_Conflict scivconf Sender_Civil_Conflict sintconf Sender_International_Conflict logspop Sender_Population_(log) logrpop Receiver_Population_(log) logsgdppc Sender_GDP_per_cap_(log) logrgdppc Receiver_GDP_per_cap_(log) _cons Constant Rtort Receiver_Torture Stort Sender_Torture Rethlink Ethnic_Kin postcoldwar Post_Cold_War Skill Sender_Killing Rkill Receiver_Killing Spolpris Sender_Political_Imprisonments Rpolpris Receiver_Political_Imprisonments Sdisap Sender_Disappearances Rdisap Receiver_Disappearances Sgenocide Sender_Genocide Rgenocide Receiver_Genocide unhcr Receiver_UNHCR_Signatory colony Sender_Former_Colony) ///
	noomit cells(b(star fmt(3)) se(par fmt(3))) rtf ///
	title(Table 1: Effect of Rivalry (Type) on Refugee Acceptance) ///
	order(rivals ideol positional spatial contiguity multiple Spolyarchy Rpolyarchy scivconf rcivconf sintconf rintconf logspop logrpop logsgdppc logrgdppc postcoldwar Sgenocide Stort Rtort Skill Rkill Sdisap Rdisap Spolpris Rpolpris TEK) ///
	addnotes("Standard errors clustered by dyad in parentheses. *p<.05, **p<.01, ***p<.001, two-tailed test.") ///
	aic ///



**Contiguity interacted with ideol ZINBs

esttab zinbrivalscontint zinbdisagcontint using tableZINBints.rtf, replace label se varwidth(40) ///
	nonumbers mlabels("Rivals" "Rivalry Type" , nodep) collabels(,none) ///
	wrap varlabels(rivals Rivalry ideol##contiguity Interaction  ideol Ideological_Rivalry positional Positional_Rivalry spatial Spatial_Rivalry contiguity Contiguity multiple Multiple Spolyarchy Sender_Democracy Rpolyarchy Receiver_Democracy rcivconf Receiver_Civil_Conflict rintconf Receiver_International_Conflict scivconf Sender_Civil_Conflict sintconf Sender_International_Conflict logspop Sender_Population_(log) logrpop Receiver_Population_(log) logsgdppc Sender_GDP_per_cap_(log) logrgdppc Receiver_GDP_per_cap_(log) _cons Constant Rtort Receiver_Torture Stort Sender_Torture Rethlink Ethnic_Kin postcoldwar Post_Cold_War Skill Sender_Killing Rkill Receiver_Killing Spolpris Sender_Political_Imprisonments Rpolpris Receiver_Political_Imprisonments Sdisap Sender_Disappearances Rdisap Receiver_Disappearances Sgenocide Sender_Genocide Rgenocide Receiver_Genocide unhcr Receiver_UNHCR_Signatory colony Sender_Former_Colony) ///
	noomit cells(b(star fmt(3)) se(par fmt(3))) rtf ///
	title(Table : Effect of Rivalry (Type) on Refugee Acceptance (Contiguity Interaction)) ///
	order(rivals ideol positional spatial contiguity multiple Spolyarchy Rpolyarchy scivconf rcivconf sintconf rintconf logspop logrpop logsgdppc logrgdppc postcoldwar Sgenocide Stort Rtort Skill Rkill Sdisap Rdisap Spolpris Rpolpris TEK) ///
	addnotes("Standard errors clustered by dyad in parentheses. *p<.05, **p<.01, ***p<.001, two-tailed test.") ///
	aic ///




*descriptive statistics 

esttab descstats using descstats.rtf, replace label se varwidth(40)


	
***Appendix


**Excluding multiple rivalries 

eststo ZINBdisagNOMULT: zinb numrefugee ideol positional spatial contiguity Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort  Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad), if multiple==0

eststo ZINBrivalsNOMULT: zinb numrefugee rivals contiguity Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad), if multiple==0


*multiples excluded table 


esttab ZINBrivalsNOMULT ZINBdisagNOMULT using tableNoMult.rtf, replace label se varwidth(40) ///
	nonumbers mlabels("Rivals" "Rivalry Type" , nodep) collabels(,none) ///
	wrap varlabels(rivals Rivalry ideol Ideological_Rivalry positional Positional_Rivalry spatial Spatial_Rivalry contiguity Contiguity Spolyarchy Sender_Democracy Rpolyarchy Receiver_Democracy rcivconf Receiver_Civil_Conflict rintconf Receiver_International_Conflict scivconf Sender_Civil_Conflict sintconf Sender_International_Conflict logspop Sender_Population_(log) logrpop Receiver_Population_(log) logsgdppc Sender_GDP_per_cap_(log) logrgdppc Receiver_GDP_per_cap_(log) _cons Constant Rtort Receiver_Torture Stort Sender_Torture Rethlink Ethnic_Kin postcoldwar Post_Cold_War Skill Sender_Killing Rkill Receiver_Killing Spolpris Sender_Political_Imprisonments Rpolpris Receiver_Political_Imprisonments Sdisap Sender_Disappearances Rdisap Receiver_Disappearances Sgenocide Sender_Genocide Rgenocide Receiver_Genocide unhcr Receiver_UNHCR_Signatory colony Sender_Former_Colony) ///
	noomit cells(b(star fmt(3)) se(par fmt(3))) rtf ///
	title(Table : Effect of Rivalry (Type) on Refugee Acceptance: Only Sending States in Sample) ///
	order(rivals ideol positional spatial contiguity Spolyarchy Rpolyarchy scivconf rcivconf sintconf rintconf logspop logrpop logsgdppc logrgdppc postcoldwar Sgenocide Stort Rtort Skill Rkill Sdisap Rdisap Spolpris Rpolpris) ///
	addnotes("Standard errors clustered by dyad in parentheses. *p<.05, **p<.01, ***p<.001, two-tailed test.") ///
	aic /// 




**Proportion of refugees accepted

eststo Propdisag: reg propaccepted ideol positional spatial contiguity multiple sdemocracy2 rdemocracy2 logspop logrpop logsgdppc logrgdppc rcivconf scivconf rintconf sintconf TEK Rtort Stort Rpolpris Spolpris Rkill Skill Rdisap Sdisap Sgenocide postcoldwar unhcr colony if refssent==1, vce(cluster dyad)

eststo Proprivals: reg propaccepted rivals contiguity multiple sdemocracy2 rdemocracy2 logspop logrpop logsgdppc logrgdppc rcivconf scivconf rintconf sintconf TEK Rtort Stort Rpolpris Spolpris Rkill Skill Rdisap Sdisap Sgenocide postcoldwar unhcr colony if refssent==1, vce(cluster dyad)



*proportion accepted table 


esttab Proprivals Propdisag using tableProportionAccepted.rtf, replace label se varwidth(40) ///
	nonumbers mlabels("Rivals" "Rivalry Type" , nodep) collabels(,none) ///
	wrap varlabels(rivals Rivalry ideol Ideological_Rivalry positional Positional_Rivalry spatial Spatial_Rivalry contiguity Contiguity sdemocracy2 Sender_Democracy rdemocracy2 Receiver_Democracy rcivconf Receiver_Civil_Conflict rintconf Receiver_International_Conflict scivconf Sender_Civil_Conflict sintconf Sender_International_Conflict logspop Sender_Population_(log) logrpop Receiver_Population_(log) logsgdppc Sender_GDP_per_cap_(log) logrgdppc Receiver_GDP_per_cap_(log) _cons Constant Rtort Receiver_Torture Stort Sender_Torture Rethlink Ethnic_Kin postcoldwar Post_Cold_War Skill Sender_Killing Rkill Receiver_Killing Spolpris Sender_Political_Imprisonments Rpolpris Receiver_Political_Imprisonments Sdisap Sender_Disappearances Rdisap Receiver_Disappearances Sgenocide Sender_Genocide Rgenocide Receiver_Genocide unhcr Receiver_UNHCR_Signatory colony Sender_Former_Colony) ///
	noomit cells(b(star fmt(3)) se(par fmt(3))) rtf ///
	title(Table : Effect of Rivalry (Type) on Refugee Acceptance: Proportion Accepted) ///
	order(rivals ideol positional spatial contiguity sdemocracy2 rdemocracy2 scivconf rcivconf sintconf rintconf logspop logrpop logsgdppc logrgdppc postcoldwar Sgenocide Stort Rtort Skill Rkill Sdisap Rdisap Spolpris Rpolpris) ///
	addnotes("Standard errors clustered by dyad in parentheses. *p<.05, **p<.01, ***p<.001, two-tailed test.") ///
	aic /// 



**US not in sample

eststo zinb1NOUS: zinb numrefugee ideol positional spatial contiguity multiple Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad), if sender!=2 & receiver!=2

eststo zinbRivalsNOUS: zinb numrefugee rivals contiguity multiple Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad), if sender!=2 & receiver!=2


*No US table


esttab zinbRivalsNOUS zinb1NOUS using tableNoUS.rtf, replace label se varwidth(40) ///
	nonumbers mlabels("Rivals" "Rivalry Type" , nodep) collabels(,none) ///
	wrap varlabels(rivals Rivalry ideol Ideological_Rivalry positional Positional_Rivalry spatial Spatial_Rivalry contiguity Contiguity Spolyarchy Sender_Democracy Rpolyarchy Receiver_Democracy rcivconf Receiver_Civil_Conflict rintconf Receiver_International_Conflict scivconf Sender_Civil_Conflict sintconf Sender_International_Conflict logspop Sender_Population_(log) logrpop Receiver_Population_(log) logsgdppc Sender_GDP_per_cap_(log) logrgdppc Receiver_GDP_per_cap_(log) _cons Constant Rtort Receiver_Torture Stort Sender_Torture Rethlink Ethnic_Kin postcoldwar Post_Cold_War Skill Sender_Killing Rkill Receiver_Killing Spolpris Sender_Political_Imprisonments Rpolpris Receiver_Political_Imprisonments Sdisap Sender_Disappearances Rdisap Receiver_Disappearances Sgenocide Sender_Genocide Rgenocide Receiver_Genocide unhcr Receiver_UNHCR_Signatory colony Sender_Former_Colony) ///
	noomit cells(b(star fmt(3)) se(par fmt(3))) rtf ///
	title(Table : Effect of Rivalry (Type) on Refugee Acceptance: US Excluded) ///
	order(rivals ideol positional spatial contiguity Spolyarchy Rpolyarchy scivconf rcivconf sintconf rintconf logspop logrpop logsgdppc logrgdppc postcoldwar Sgenocide Stort Rtort Skill Rkill Sdisap Rdisap Spolpris Rpolpris) ///
	addnotes("Standard errors clustered by dyad in parentheses. *p<.05, **p<.01, ***p<.001, two-tailed test.") ///
	aic /// 



**no major powers in sample

eststo nomajpowersdisag: zinb numrefugee ideol positional spatial contiguity multiple Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad), if majpow1==0 & majpow2==0

eststo nomajpowersrivals: zinb numrefugee rivals contiguity multiple Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad), if majpow1==0 & majpow2==0


*no major powers table 


esttab nomajpowersrivals nomajpowersdisag using tableNoMajorPowers.rtf, replace label se varwidth(40) ///
	nonumbers mlabels("Rivals" "Rivalry Type" , nodep) collabels(,none) ///
	wrap varlabels(rivals Rivalry ideol Ideological_Rivalry positional Positional_Rivalry spatial Spatial_Rivalry contiguity Contiguity Spolyarchy Sender_Democracy Rpolyarchy Receiver_Democracy rcivconf Receiver_Civil_Conflict rintconf Receiver_International_Conflict scivconf Sender_Civil_Conflict sintconf Sender_International_Conflict logspop Sender_Population_(log) logrpop Receiver_Population_(log) logsgdppc Sender_GDP_per_cap_(log) logrgdppc Receiver_GDP_per_cap_(log) _cons Constant Rtort Receiver_Torture Stort Sender_Torture Rethlink Ethnic_Kin postcoldwar Post_Cold_War Skill Sender_Killing Rkill Receiver_Killing Spolpris Sender_Political_Imprisonments Rpolpris Receiver_Political_Imprisonments Sdisap Sender_Disappearances Rdisap Receiver_Disappearances Sgenocide Sender_Genocide Rgenocide Receiver_Genocide unhcr Receiver_UNHCR_Signatory colony Sender_Former_Colony) ///
	noomit cells(b(star fmt(3)) se(par fmt(3))) rtf ///
	title(Table : Effect of Rivalry (Type) on Refugee Acceptance: Major Powers Excluded) ///
	order(rivals ideol positional spatial contiguity Spolyarchy Rpolyarchy scivconf rcivconf sintconf rintconf logspop logrpop logsgdppc logrgdppc postcoldwar Sgenocide Stort Rtort Skill Rkill Sdisap Rdisap Spolpris Rpolpris) ///
	addnotes("Standard errors clustered by dyad in parentheses. *p<.05, **p<.01, ***p<.001, two-tailed test.") ///
	aic /// 



**only contiguous states (ideol insig, positional and spatial pos and sig. Rivals pos and sig)

eststo disagcontiguous: zinb numrefugee ideol positional spatial multiple Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad), if contiguity==1

eststo rivalscontiguous: zinb numrefugee rivals multiple Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad), if contiguity==1


*only contiguous states table 
*DO NOT USE

esttab rivalscontiguous disagcontiguous using tableOnlyContiguous.rtf, replace label se varwidth(40) ///
	nonumbers mlabels("Rivals" "Rivalry Type" , nodep) collabels(,none) ///
	wrap varlabels(rivals Rivalry ideol Ideological_Rivalry positional Positional_Rivalry spatial Spatial_Rivalry Spolyarchy Sender_Democracy Rpolyarchy Receiver_Democracy rcivconf Receiver_Civil_Conflict rintconf Receiver_International_Conflict scivconf Sender_Civil_Conflict sintconf Sender_International_Conflict logspop Sender_Population_(log) logrpop Receiver_Population_(log) logsgdppc Sender_GDP_per_cap_(log) logrgdppc Receiver_GDP_per_cap_(log) _cons Constant Rtort Receiver_Torture Stort Sender_Torture Rethlink Ethnic_Kin postcoldwar Post_Cold_War Skill Sender_Killing Rkill Receiver_Killing Spolpris Sender_Political_Imprisonments Rpolpris Receiver_Political_Imprisonments Sdisap Sender_Disappearances Rdisap Receiver_Disappearances Sgenocide Sender_Genocide Rgenocide Receiver_Genocide unhcr Receiver_UNHCR_Signatory colony Sender_Former_Colony) ///
	noomit cells(b(star fmt(3)) se(par fmt(3))) rtf ///
	title(Table : Effect of Rivalry (Type) on Refugee Acceptance: Contiguous States) ///
	order(rivals ideol positional spatial Spolyarchy Rpolyarchy scivconf rcivconf sintconf rintconf logspop logrpop logsgdppc logrgdppc postcoldwar Sgenocide Stort Rtort Skill Rkill Sdisap Rdisap Spolpris Rpolpris) ///
	addnotes("Standard errors clustered by dyad in parentheses. *p<.05, **p<.01, ***p<.001, two-tailed test.") ///
	aic /// 



**only noncontiguous states 

eststo disagNONcontiguous: zinb numrefugee ideol positional spatial multiple Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad), if contiguity==0

eststo rivalsNONcontiguous: zinb numrefugee rivals multiple Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad), if contiguity==0


*only noncontiguous states table 


esttab rivalsNONcontiguous disagNONcontiguous using tableNONContiguous.rtf, replace label se varwidth(40) ///
	nonumbers mlabels("Rivals" "Rivalry Type" , nodep) collabels(,none) ///
	wrap varlabels(rivals Rivalry ideol Ideological_Rivalry positional Positional_Rivalry spatial Spatial_Rivalry Spolyarchy Sender_Democracy Rpolyarchy Receiver_Democracy rcivconf Receiver_Civil_Conflict rintconf Receiver_International_Conflict scivconf Sender_Civil_Conflict sintconf Sender_International_Conflict logspop Sender_Population_(log) logrpop Receiver_Population_(log) logsgdppc Sender_GDP_per_cap_(log) logrgdppc Receiver_GDP_per_cap_(log) _cons Constant Rtort Receiver_Torture Stort Sender_Torture Rethlink Ethnic_Kin postcoldwar Post_Cold_War Skill Sender_Killing Rkill Receiver_Killing Spolpris Sender_Political_Imprisonments Rpolpris Receiver_Political_Imprisonments Sdisap Sender_Disappearances Rdisap Receiver_Disappearances Sgenocide Sender_Genocide Rgenocide Receiver_Genocide unhcr Receiver_UNHCR_Signatory colony Sender_Former_Colony) ///
	noomit cells(b(star fmt(3)) se(par fmt(3))) rtf ///
	title(Table : Effect of Rivalry (Type) on Refugee Acceptance: Noncontiguous States) ///
	order(rivals ideol positional spatial Spolyarchy Rpolyarchy scivconf rcivconf sintconf rintconf logspop logrpop logsgdppc logrgdppc postcoldwar Sgenocide Stort Rtort Skill Rkill Sdisap Rdisap Spolpris Rpolpris) ///
	addnotes("Standard errors clustered by dyad in parentheses. *p<.05, **p<.01, ***p<.001, two-tailed test.") ///
	aic /// 



**Tobit regression 

eststo tobit: tobit propaccepted ideol positional spatial contiguity multiple Spolyarchy Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf scivconf rintconf rcivconf TEK Rtort Rpolpris Rkill Rdisap Stort Spolpris Skill Sdisap Sgenocide postcoldwar unhcr colony, ll(-0.00001) ul(1.01) vce(cluster dyad)

eststo tobitrivals: tobit propaccepted rivals contiguity multiple Spolyarchy Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf scivconf rintconf rcivconf TEK Rtort Rpolpris Rkill Rdisap Stort Spolpris Skill Sdisap Sgenocide postcoldwar unhcr colony, ll(0) ul(1) vce(cluster dyad)


*tobit table


esttab tobitrivals tobit using tableTobits.rtf, replace label se varwidth(40) ///
	nonumbers mlabels("Rivals" "Rivalry Type" , nodep) collabels(,none) ///
	wrap varlabels(rivals Rivalry ideol Ideological_Rivalry positional Positional_Rivalry spatial Spatial_Rivalry contiguity Contiguity sdemocracy2 Sender_Democracy rdemocracy2 Receiver_Democracy rcivconf Receiver_Civil_Conflict rintconf Receiver_International_Conflict scivconf Sender_Civil_Conflict sintconf Sender_International_Conflict logspop Sender_Population_(log) logrpop Receiver_Population_(log) logsgdppc Sender_GDP_per_cap_(log) logrgdppc Receiver_GDP_per_cap_(log) _cons Constant Rtort Receiver_Torture Stort Sender_Torture Rethlink Ethnic_Kin postcoldwar Post_Cold_War Skill Sender_Killing Rkill Receiver_Killing Spolpris Sender_Political_Imprisonments Rpolpris Receiver_Political_Imprisonments Sdisap Sender_Disappearances Rdisap Receiver_Disappearances Sgenocide Sender_Genocide Rgenocide Receiver_Genocide unhcr Receiver_UNHCR_Signatory colony Sender_Former_Colony) ///
	noomit cells(b(star fmt(3)) se(par fmt(3))) rtf ///
	title(Table : Effect of Rivalry (Type) on Refugee Acceptance: Proportion Accepted, Tobit Regression) ///
	order(rivals ideol positional spatial contiguity sdemocracy2 rdemocracy2 scivconf rcivconf sintconf rintconf logspop logrpop logsgdppc logrgdppc postcoldwar Sgenocide Stort Rtort Skill Rkill Sdisap Rdisap Spolpris Rpolpris) ///
	addnotes("Standard errors clustered by dyad in parentheses. *p<.05, **p<.01, ***p<.001, two-tailed test.") ///
	aic /// 



**only post-cold war 

eststo disagpostCW: zinb numrefugee ideol positional spatial contiguity multiple Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad), if year>1989

eststo rivalspostCW: zinb numrefugee rivals contiguity multiple Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad), if year>1989


**multiple rivalry interaction with ideol

eststo multint: zinb numrefugee ideol##mult positional spatial contiguity Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad)


**only senders in dyad

eststo rivalssendersonly: logit direfugee rivals contiguity multiple Spolyarchy Rpolyarchy logspop logrpop logsgdppc logrgdppc scivconf rcivconf sintconf rintconf TEK Stort Rtort Spolpris Rpolpris Skill Rkill Sdisap Rdisap Sgenocide Rgenocide unhcr colony postcoldwar if refssent==1, vce(cluster dyad)

eststo disagsendersonly: logit direfugee ideol positional spatial contiguity multiple Spolyarchy Rpolyarchy logspop logrpop logsgdppc logrgdppc scivconf rcivconf sintconf rintconf TEK Stort Rtort Spolpris Rpolpris Skill Rkill Sdisap Rdisap Sgenocide Rgenocide unhcr colony postcoldwar if refssent==1, vce(cluster dyad)

eststo rivalssendersonlythresh: logit threshold rivals contiguity multiple Spolyarchy Rpolyarchy logspop logrpop logsgdppc logrgdppc scivconf rcivconf sintconf rintconf TEK Stort Rtort Spolpris Rpolpris Skill Rkill Sdisap Rdisap Sgenocide Rgenocide unhcr colony postcoldwar if refssent==1, vce(cluster dyad)

eststo disagsendersonlythresh: logit threshold ideol positional spatial contiguity multiple Spolyarchy Rpolyarchy logspop logrpop logsgdppc logrgdppc scivconf rcivconf sintconf rintconf TEK Stort Rtort Spolpris Rpolpris Skill Rkill Sdisap Rdisap Sgenocide Rgenocide unhcr colony postcoldwar if refssent==1, vce(cluster dyad)


*only senders in dyad table 


esttab rivalssendersonly disagsendersonly using tableOnlySendersLogits.rtf, replace label se varwidth(40) ///
	nonumbers mlabels("Rivals" "Rivalry Type" , nodep) collabels(,none) ///
	wrap varlabels(rivals Rivalry ideol Ideological_Rivalry positional Positional_Rivalry spatial Spatial_Rivalry contiguity Contiguity Spolyarchy Sender_Democracy Rpolyarchy Receiver_Democracy rcivconf Receiver_Civil_Conflict rintconf Receiver_International_Conflict scivconf Sender_Civil_Conflict sintconf Sender_International_Conflict logspop Sender_Population_(log) logrpop Receiver_Population_(log) logsgdppc Sender_GDP_per_cap_(log) logrgdppc Receiver_GDP_per_cap_(log) _cons Constant Rtort Receiver_Torture Stort Sender_Torture Rethlink Ethnic_Kin postcoldwar Post_Cold_War Skill Sender_Killing Rkill Receiver_Killing Spolpris Sender_Political_Imprisonments Rpolpris Receiver_Political_Imprisonments Sdisap Sender_Disappearances Rdisap Receiver_Disappearances Sgenocide Sender_Genocide Rgenocide Receiver_Genocide unhcr Receiver_UNHCR_Signatory colony Sender_Former_Colony) ///
	noomit cells(b(star fmt(3)) se(par fmt(3))) rtf ///
	title(Table : Effect of Rivalry (Type) on Refugee Acceptance: Logits, Only Senders) ///
	order(rivals ideol positional spatial contiguity Spolyarchy Rpolyarchy scivconf rcivconf sintconf rintconf logspop logrpop logsgdppc logrgdppc postcoldwar Sgenocide Stort Rtort Skill Rkill Sdisap Rdisap Spolpris Rpolpris) ///
	addnotes("Standard errors clustered by dyad in parentheses. *p<.05, **p<.01, ***p<.001, two-tailed test.") ///
	aic /// 


*only senders in dyads, threshold DV table


esttab rivalssendersonlythresh disagsendersonlythresh using tableOnlySendersThreshLogits.rtf, replace label se varwidth(40) ///
	nonumbers mlabels("Rivals" "Rivalry Type" , nodep) collabels(,none) ///
	wrap varlabels(rivals Rivalry ideol Ideological_Rivalry positional Positional_Rivalry spatial Spatial_Rivalry contiguity Contiguity Spolyarchy Sender_Democracy Rpolyarchy Receiver_Democracy rcivconf Receiver_Civil_Conflict rintconf Receiver_International_Conflict scivconf Sender_Civil_Conflict sintconf Sender_International_Conflict logspop Sender_Population_(log) logrpop Receiver_Population_(log) logsgdppc Sender_GDP_per_cap_(log) logrgdppc Receiver_GDP_per_cap_(log) _cons Constant Rtort Receiver_Torture Stort Sender_Torture Rethlink Ethnic_Kin postcoldwar Post_Cold_War Skill Sender_Killing Rkill Receiver_Killing Spolpris Sender_Political_Imprisonments Rpolpris Receiver_Political_Imprisonments Sdisap Sender_Disappearances Rdisap Receiver_Disappearances Sgenocide Sender_Genocide Rgenocide Receiver_Genocide unhcr Receiver_UNHCR_Signatory colony Sender_Former_Colony) ///
	noomit cells(b(star fmt(3)) se(par fmt(3))) rtf ///
	title(Table : Effect of Rivalry (Type) on Refugee Acceptance: Logits, Only Senders) ///
	order(rivals ideol positional spatial contiguity Spolyarchy Rpolyarchy scivconf rcivconf sintconf rintconf logspop logrpop logsgdppc logrgdppc postcoldwar Sgenocide Stort Rtort Skill Rkill Sdisap Rdisap Spolpris Rpolpris) ///
	addnotes("Standard errors clustered by dyad in parentheses. *p<.05, **p<.01, ***p<.001, two-tailed test.") ///
	aic /// 



**ACLP democracy indicator 

eststo ACLPdisag: zinb numrefugee ideol positional spatial contiguity multiple Raclp logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Saclp Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad)

eststo ACLPrivals: zinb numrefugee rivals contiguity multiple Raclp logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Saclp Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad)


**v2x_jucon democracy indicator 

eststo jucondisag: zinb numrefugee ideol positional spatial contiguity multiple Rjucon logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Sjucon Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad)

eststo juconrivals: zinb numrefugee rivals contiguity multiple Rjucon logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Sjucon Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad)


**dichotomous transformation of Polity variable 

eststo politydisag: zinb numrefugee ideol positional spatial contiguity multiple rdemocracy2 logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf sdemocracy2 Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad)

eststo polityrivals: zinb numrefugee rivals contiguity multiple rdemocracy2 logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf sdemocracy2 Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad)


*alternate democracies table


esttab ACLPrivals polityrivals ACLPdisag politydisag using tableAlternateDemocracies.rtf, replace label se varwidth(20) ///
	nonumbers mlabels("Rivals" "Rivalry Type" , nodep) collabels(,none) ///
	wrap varlabels(rivals Rivalry ideol Ideological_Rivalry positional Positional_Rivalry spatial Spatial_Rivalry contiguity Contiguity Spolyarchy Sender_Democracy Rpolyarchy Receiver_Democracy rcivconf Receiver_Civil_Conflict rintconf Receiver_International_Conflict scivconf Sender_Civil_Conflict sintconf Sender_International_Conflict logspop Sender_Population_(log) logrpop Receiver_Population_(log) logsgdppc Sender_GDP_per_cap_(log) logrgdppc Receiver_GDP_per_cap_(log) _cons Constant Rtort Receiver_Torture Stort Sender_Torture Rethlink Ethnic_Kin postcoldwar Post_Cold_War Skill Sender_Killing Rkill Receiver_Killing Spolpris Sender_Political_Imprisonments Rpolpris Receiver_Political_Imprisonments Sdisap Sender_Disappearances Rdisap Receiver_Disappearances Sgenocide Sender_Genocide Rgenocide Receiver_Genocide unhcr Receiver_UNHCR_Signatory colony Sender_Former_Colony) ///
	noomit cells(b(star fmt(3)) se(par fmt(3))) rtf ///
	title(Table : Effect of Rivalry (Type) on Refugee Acceptance: Alternate Democracy Measures) ///
	order(rivals ideol positional spatial Saclp Raclp Sjucon Rjucon sdemocracy2 rdemocracy2 contiguity scivconf rcivconf sintconf rintconf logspop logrpop logsgdppc logrgdppc postcoldwar Sgenocide Stort Rtort Skill Rkill Sdisap Rdisap Spolpris Rpolpris) ///
	addnotes("Standard errors clustered by dyad in parentheses. *p<.05, **p<.01, ***p<.001, two-tailed test.") ///
	aic /// 


*jucon table 


esttab juconrivals jucondisag using tablejuconDemocracies.rtf, replace label se varwidth(40) ///
	nonumbers mlabels("Rivals" "Rivalry Type" , nodep) collabels(,none) ///
	wrap varlabels(rivals Rivalry ideol Ideological_Rivalry positional Positional_Rivalry spatial Spatial_Rivalry contiguity Contiguity Sjucon Sender_Democracy Rjucon Receiver_Democracy rcivconf Receiver_Civil_Conflict rintconf Receiver_International_Conflict scivconf Sender_Civil_Conflict sintconf Sender_International_Conflict logspop Sender_Population_(log) logrpop Receiver_Population_(log) logsgdppc Sender_GDP_per_cap_(log) logrgdppc Receiver_GDP_per_cap_(log) _cons Constant Rtort Receiver_Torture Stort Sender_Torture Rethlink Ethnic_Kin postcoldwar Post_Cold_War Skill Sender_Killing Rkill Receiver_Killing Spolpris Sender_Political_Imprisonments Rpolpris Receiver_Political_Imprisonments Sdisap Sender_Disappearances Rdisap Receiver_Disappearances Sgenocide Sender_Genocide Rgenocide Receiver_Genocide unhcr Receiver_UNHCR_Signatory colony Sender_Former_Colony) ///
	noomit cells(b(star fmt(3)) se(par fmt(3))) rtf ///
	title(Table : Effect of Rivalry (Type) on Refugee Acceptance: Alternate Democracy Measures) ///
	order(rivals ideol positional spatial Saclp Raclp Sjucon Rjucon sdemocracy2 rdemocracy2 contiguity scivconf rcivconf sintconf rintconf logspop logrpop logsgdppc logrgdppc postcoldwar Sgenocide Stort Rtort Skill Rkill Sdisap Rdisap Spolpris Rpolpris) ///
	addnotes("Standard errors clustered by dyad in parentheses. *p<.05, **p<.01, ***p<.001, two-tailed test.") ///
	aic /// 



*accounting for receivers being major power

eststo majpow: zinb numrefugee ideol positional spatial contiguity multiple Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony majpow1, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad)

eststo majpowinteract: zinb numrefugee ideol##majpow1 positional spatial contiguity multiple Rpolyarchy logspop logrpop logsgdppc logrgdppc rcivconf rintconf TEK Rtort Rpolpris Rkill Rdisap postcoldwar unhcr colony, inflate(scivconf sintconf Spolyarchy Stort Spolpris Skill Sdisap Sgenocide) vce(cluster dyad)


*table


esttab majpow majpowinteract using majorReceivers.rtf, replace label se varwidth(40) ///
	nonumbers mlabels("Control" "Interaction" , nodep) collabels(,none) ///
	wrap varlabels(ideol Ideological_Rivalry positional Positional_Rivalry spatial Spatial_Rivalry contiguity Contiguity multiple Multiple Spolyarchy Sender_Democracy Rpolyarchy Receiver_Democracy rcivconf Receiver_Civil_Conflict rintconf Receiver_International_Conflict scivconf Sender_Civil_Conflict sintconf Sender_International_Conflict logspop Sender_Population_(log) logrpop Receiver_Population_(log) logsgdppc Sender_GDP_per_cap_(log) logrgdppc Receiver_GDP_per_cap_(log) _cons Constant Rtort Receiver_Torture Stort Sender_Torture Rethlink Ethnic_Kin postcoldwar Post_Cold_War Skill Sender_Killing Rkill Receiver_Killing Spolpris Sender_Political_Imprisonments Rpolpris Receiver_Political_Imprisonments Sdisap Sender_Disappearances Rdisap Receiver_Disappearances Sgenocide Sender_Genocide Rgenocide Receiver_Genocide unhcr Receiver_UNHCR_Signatory colony Sender_Former_Colony majpow1 Major_Receiver) ///
	noomit cells(b(star fmt(3)) se(par fmt(3))) rtf ///
	title(Table : Effect of Rivalry Type on Refugee Acceptance, Major Receivers Accounted For) ///
	order(ideol majpow1 positional spatial contiguity multiple Spolyarchy Rpolyarchy scivconf rcivconf sintconf rintconf logspop logrpop logsgdppc logrgdppc postcoldwar Sgenocide Stort Rtort Skill Rkill Sdisap Rdisap Spolpris Rpolpris TEK) ///
	addnotes("Standard errors clustered by dyad in parentheses. *p<.05, **p<.01, ***p<.001, two-tailed test.") ///
	aic ///



